import moment from 'moment';

let dates = [];
let data = [0.24];

const range = [75, 100];

for (let i = 0; i <= 7 * 12; i++) {
    dates.push(moment().subtract(7 * 12 - i, 'day').format('YYYY-MM-DD'));
    const value = Math.random() * 100;
    data.push(value.toFixed(2));
}

export const pieOption = {
    color: ['#00a854', '#348EED', '#ffcc2d', '#aaa'],
    tooltip : {
        trigger: 'item',
        formatter: "{b} : {c}小时 ({d}%)"
    },
    series : [
        {
            name: '',
            type: 'pie',
            radius : '75%',
            center: ['50%', '50%'],
            data:[
                {value:310, name:'运转'},
                {value:234, name:'通电未运转'},
                {value:135, name:'预约未通电'},
                {value:1548, name:'空置'}
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ],
    animationDuration: 1000
};
